package com.bnyy.message.event;

import com.bnyy.message.bean.Message;
import com.bnyy.message.enums.MessageType;

/**
 * Author : 关炳鹏
 * Description :
 * Date : 2022/12/10
 **/
public class MessageEvent {

    private MessageType messageType;
    private Message message;

    public MessageEvent(MessageType messageType, Message message) {
        this.messageType = messageType;
        this.message = message;
    }

    public MessageEvent(MessageType messageType) {
        this.messageType = messageType;
    }

    public MessageEvent(Message message) {
        this.message = message;
        this.messageType = message.getMessageType();
    }

    public Message getMessage() {
        return message;
    }

    public MessageType getMessageType() {
        return messageType;
    }
}
